<template>
	<view class="body">
		<xk-header title="防疫详情"></xk-header>
		<view class="util-bar">
			<view class="estate-box">
				<u-row customStyle="margin-bottom:15px">
					<u-col span="12"><view class="danhao-text">单号：{{allData.apply_no}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">申请人编号:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.apply_user_id}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">申请人:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.apply_user}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">单位名称:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.company}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">申请日期:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.apply_date}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">联系方式:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.phone}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">始发地:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.start_address}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">有无来往高风险地区:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.highrisk ? "是" : "否"}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">交通方式:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.traffic_manner}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">车牌号:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.plate_number}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">申请入园日期:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.apply_park_date}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">入园事由:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.park_reason}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">备注:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.remark}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<!-- <u-tooltip text="复制" overlay></u-tooltip> -->
					<u-col span="5"><view class="grey-text">健康码:</view></u-col>
					<u-col span="7">
						<view v-if="allData.jkcode">
							<image-list :pics="allData.jkcode" :key="new Date().getTime()"></image-list>
						</view>
					</u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">行程码:</view></u-col>
					<u-col span="7">
						<view v-if="allData.xccode">
							<image-list :pics="allData.xccode" :key="new Date().getTime()"></image-list>
						</view>
					</u-col>
				</u-row>
			</view>
		</view>

		<view class="util-bar" v-if="allData.park_status == 40||allData.park_status == 60 ||allData.park_status == 30">
			<view class="estate-box">
				<u-row customStyle="margin-bottom:15px">
					<u-col span="12"><view class="danhao-text">受理结果 :</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">受理结论:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.accept_conclusion}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">受理备注:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.accept_remark}}</view></u-col>
				</u-row>

			</view>
		</view>

		<view class="util-bar" v-if="allData.park_status == 40">
			<view class="estate-box">
				<u-row customStyle="margin-bottom:15px">
					<u-col span="12"><view class="danhao-text">登记结果 :</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">登记备注:</view></u-col>
					<u-col span="7"><view class="black-text">{{allData.register_remark}}</view></u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">受理健康码:</view></u-col>
					<u-col span="7">
						<view v-if="allData.register_jkcode">
							<image-list :pics="allData.register_jkcode"></image-list>
						</view>
					</u-col>
				</u-row>
				<u-row customStyle="margin-bottom:8px">
					<u-col span="5"><view class="grey-text">受理行程码:</view></u-col>
					<u-col span="7">
						<view v-if="allData.register_jkcode">
							<image-list :pics="allData.register_xccode"></image-list>
						</view>
					</u-col>
				</u-row>

			</view>
		</view>
		
		<!--修改按钮-->
		<view class="common-bottom-view" v-if="allData.park_status == 10 || allData.park_status == 60">
			<view class="common-btn" @click="modify">修改</view>
		</view>
		<view class="common-bottom-view" v-else>
			<view class="common-btn" @click="back">返回</view>
		</view>
		
		<view class="common-zw"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				allData:'',
			}
		},
		onShow(){
			this.allData = ''
			this.getDetail()
			console.log("时间戳：",new Date().getTime())
		},
		onLoad(options) {
			this.park_id = options.parkId
			console.log("查看详情id号: ",this.park_id)
		},
		methods: {
			
			//修改功能
			modify(){
				console.log("modify:",this.allData)
				console.log("状态：",this.allData.highrisk)
				uni.navigateTo({
					url: '/pagesA/prevention-park/prevention-park-apply?parkId=' + this.allData.park_id + '&highrisk=' + this.allData.highrisk
				})
			},
			
			//返回
			back(){
				uni.navigateBack()
			},
			
			//传递详情
			getDetail(){
				this.$api.prevention_park_detail(this.park_id).then((res) => {
					console.log("表单信息：",res)
					this.allData = res.poPreventionPark_getPreventionPark
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.body{
	background:#F8F8F8;
}
.estate-box{
	background:#FFFFFF;
	padding:10px 10px 10px 10px;
	margin:10px;
	border-radius:6px;
	font-size:28rpx;
}
.danhao-text{
	font-size:32rpx;
	font-weight:bold;
}
.grey-text{
	color:#999999;
}
.black-text{
	padding-left:5px;
}
.color-text-1{
	padding-left:5px;
	color:#59A0FF;
}
.color-text-2{
	padding-left:5px;
	color:#0660FF;
}
.color-text-3{
	padding-left:5px;
	color:#000000;
}
.color-text-4{
	padding-left:5px;
	color:#ff0000;
}
.wy-title{
	text-align: center;
	font-size:18px;
	padding:15px 0 15px 0;
	border-bottom:1px solid #f1f1f1;
	font-weight:bold;
	background-color:#f1f1f1;
	border-radius:8px 8px 0 0;
}
.wybox{
	padding:15px;
	margin:15px;
	background-color:#f8f8f8;
	font-size:28rpx;
	border-radius:8px;
}
.wy-left-text{
	color:#999999;
}
.wy-right-text{
	color:#000000;
	margin-left:5px;
}
.scroll-Y{
	max-height:60vh;
}
</style>
